import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询 /ttVsTestDirveRebate/page
export const queryList = (params) => axios.post(`${SERVER.RETAIL}/ttVsTestDirveRebate/page`, params)


// 详情  /ttVsTestDirveRebate/auditDetails
export const queryById = (id) => axios.get(`${SERVER.RETAIL}/ttVsTestDirveRebate/auditDetails?rebateId=${id}`)

// 通过 驳回 /ttVsTestDirveRebate/profitCashingReview
export const saveData = (params) => axios.post(`${SERVER.RETAIL}/ttVsTestDirveRebate/profitCashingReview`, params)


// 导出 /ttVsTestDirve/excel
export const exportExcel = (params) => axios.post(`${SERVER.RETAIL}/ttVsTestDirveRebate/excel`, params, {
  responseType: 'blob'
})

// 操作记录
export const queryRecordById = (id) => axios.get(`${SERVER.RETAIL}/wholesales_1_1/vsTestDirveLog/selecetByDirveId?dirveId=${id}`)

// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
